home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-04-25 | 1.5 KB | 66 lines | [TEXT/CWIE] |
- // ==================================================
- // CPrefsFile.h
- // Copyright (C) 1996-1997 Mizutori Tetsuya
- // July 4, 1996; February 3, 1997; March 14, 1997.
- // ==================================================
- // All documents are pretty-printed in 10-point Geneva font.
-
- #pragma once
-
- #include <LPreferencesFile.h>
-
-
- class CPrefsFile : public LPreferencesFile {
-
- public:
- // Create a FSSpec for the preferences file placed in the Preferences folder
- CPrefsFile();
- CPrefsFile( ConstStr255Param inFileName,
- OSType inPrefFileCreator );
- virtual ~CPrefsFile();
-
- protected:
-
- // Setup constants at startup.
- void SetupConstants( void );
-
- void SetupFileInfo(
- OSType inPrefFileType,
- OSType inPrefFileCreator );
-
- void SetupResType(
- ResType inPrefResType,
- ResIDT inPrefResID );
-
- // Read a block data from the preferences file
- OSErr LoadPrefs(
- long & outBlockDataLen,
- Handle outBlockDataH );
-
- OSErr LoadPrefs(
- long & outBlockDataLen,
- Handle outBlockDataH,
- ResType inPrefResType,
- ResIDT inPrefResID );
-
- // Write a block data to the preferences file
- OSErr SavePrefs(
- long inBlockDataLen,
- Handle inBlockDataH );
-
- OSErr SavePrefs(
- long inBlockDataLen,
- Handle inBlockDataH,
- ResType inPrefResType,
- ResIDT inPrefResID );
-
- private:
-
- OSType mPrefFileType; // 'pref'
- OSType mPrefFileCreator; // 'MzTm'
- ResType mPrefResType; // 'PREF'
- ResIDT mPrefResID; // 1000
- };
-
- // end of definitions
-